package withdrawal

import "yundian/internel/pkg/dingo"

// --------------------------- 设置默认初始值 ------------------------- //

type WithdrawalLogAttr func(model *WithdrawalLogModel)

type WithdrawalLogAttrs []WithdrawalLogAttr

func (attrFunc WithdrawalLogAttrs) Apply(m *WithdrawalLogModel) {
	for _, f := range attrFunc {
		f(m)
	}
}

func WithCreateAt(createAt dingo.Time) WithdrawalLogAttr {
	return func(m *WithdrawalLogModel) { m.CreateAt = createAt }
}

func WithUpdateAt(updateAt dingo.Time) WithdrawalLogAttr {
	return func(m *WithdrawalLogModel) { m.UpdateAt = updateAt }
}